﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="DataSetTraceServerDetails" targetNamespace="http://tempuri.org/DataSetTraceServerDetails.xsd" xmlns:mstns="http://tempuri.org/DataSetTraceServerDetails.xsd" xmlns="http://tempuri.org/DataSetTraceServerDetails.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection ConnectionStringObject="Data Source=SEREENA-PC\SEREENASQL2008;Initial Catalog=SQLServerHealthCheckDeploy;Integrated Security=True;Pooling=False" IsAppSettingsProperty="false" Modifier="Assembly" Name="sereena-pc\sereenasql2008.SQLServerHealthCheckDeploy.dbo" ParameterPrefix="@" Provider="System.Data.SqlClient" />
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="TraceDetails_ServerTableAdapter" GeneratorDataComponentClassName="TraceDetails_ServerTableAdapter" Name="TraceDetails_Server" UserDataComponentName="TraceDetails_ServerTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="sereena-pc\sereenasql2008.SQLServerHealthCheckDeploy.dbo" DbObjectName="SELECT (NormalizedTextData) AS [NormalizedSQL] ,COUNT(NormalizedTextData) AS [Count],SUM(CPU) AS [CPU], SUM(Reads) AS [Reads],SUM(Writes) AS [Writes],SUM(duration)AS [Duration] FROM TraceDetails_NormalizedText WHERE LEN( LTRIM(rtrim(NormalizedTextData)))&lt;&gt;0 GROUP BY NormalizedTextData" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="false" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>select Top 10 [NormalizedSQL],[Count], [CPU],
 [Reads], [Writes],[Duration],CPU/[Count] as AvgCPU,Reads/[COUNT] as AvgReads from 
(
select (NormalizedTextData) as [NormalizedSQL]  ,count(NormalizedTextData) as [Count],SUM(CPU) as [CPU],
SUM(Reads) as [Reads],SUM(Writes) as [Writes],Sum(duration)as [Duration] from TraceDetails_NormalizedText
where LEN( LTRIM(rtrim(NormalizedTextData)))&lt;&gt;0
group by NormalizedTextData)T order by Duration desc</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Reads" DataSetColumn="Reads" />
              <Mapping SourceColumn="Writes" DataSetColumn="Writes" />
              <Mapping SourceColumn="Duration" DataSetColumn="Duration" />
              <Mapping SourceColumn="NormalizedSQL" DataSetColumn="NormalizedSQL" />
              <Mapping SourceColumn="Count" DataSetColumn="Count" />
              <Mapping SourceColumn="CPU" DataSetColumn="CPU" />
              <Mapping SourceColumn="AvgCPU" DataSetColumn="AvgCPU" />
              <Mapping SourceColumn="AvgReads" DataSetColumn="AvgReads" />
            </Mappings>
            <Sources />
          </TableAdapter>
        </Tables>
        <Sources />
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="DataSetTraceServerDetails" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="true" msprop:Generator_DataSetName="DataSetTraceServerDetails" msprop:Generator_UserDSName="DataSetTraceServerDetails">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="TraceDetails_Server" msprop:Generator_TableClassName="TraceDetails_ServerDataTable" msprop:Generator_TableVarName="tableTraceDetails_Server" msprop:Generator_TablePropName="TraceDetails_Server" msprop:Generator_RowDeletingName="TraceDetails_ServerRowDeleting" msprop:Generator_UserTableName="TraceDetails_Server" msprop:Generator_RowChangingName="TraceDetails_ServerRowChanging" msprop:Generator_RowEvHandlerName="TraceDetails_ServerRowChangeEventHandler" msprop:Generator_RowDeletedName="TraceDetails_ServerRowDeleted" msprop:Generator_RowEvArgName="TraceDetails_ServerRowChangeEvent" msprop:Generator_RowChangedName="TraceDetails_ServerRowChanged" msprop:Generator_RowClassName="TraceDetails_ServerRow">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Reads" msprop:Generator_ColumnVarNameInTable="columnReads" msprop:Generator_ColumnPropNameInRow="Reads" msprop:Generator_ColumnPropNameInTable="ReadsColumn" msprop:Generator_UserColumnName="Reads" type="xs:long" minOccurs="0" />
              <xs:element name="Writes" msprop:Generator_ColumnVarNameInTable="columnWrites" msprop:Generator_ColumnPropNameInRow="Writes" msprop:Generator_ColumnPropNameInTable="WritesColumn" msprop:Generator_UserColumnName="Writes" type="xs:long" minOccurs="0" />
              <xs:element name="Duration" msprop:Generator_ColumnVarNameInTable="columnDuration" msprop:Generator_ColumnPropNameInRow="Duration" msprop:Generator_ColumnPropNameInTable="DurationColumn" msprop:Generator_UserColumnName="Duration" type="xs:long" minOccurs="0" />
              <xs:element name="NormalizedSQL" msprop:Generator_ColumnVarNameInTable="columnNormalizedSQL" msprop:Generator_ColumnPropNameInRow="NormalizedSQL" msprop:Generator_ColumnPropNameInTable="NormalizedSQLColumn" msprop:Generator_UserColumnName="NormalizedSQL" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="2147483647" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Count" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnCount" msprop:Generator_ColumnPropNameInRow="Count" msprop:Generator_ColumnPropNameInTable="CountColumn" msprop:Generator_UserColumnName="Count" type="xs:int" minOccurs="0" />
              <xs:element name="CPU" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnCPU" msprop:Generator_ColumnPropNameInRow="CPU" msprop:Generator_ColumnPropNameInTable="CPUColumn" msprop:Generator_UserColumnName="CPU" type="xs:long" minOccurs="0" />
              <xs:element name="AvgCPU" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnAvgCPU" msprop:Generator_ColumnPropNameInRow="AvgCPU" msprop:Generator_ColumnPropNameInTable="AvgCPUColumn" msprop:Generator_UserColumnName="AvgCPU" type="xs:long" minOccurs="0" />
              <xs:element name="AvgReads" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnAvgReads" msprop:Generator_ColumnPropNameInRow="AvgReads" msprop:Generator_ColumnPropNameInTable="AvgReadsColumn" msprop:Generator_UserColumnName="AvgReads" type="xs:long" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
  </xs:element>
</xs:schema>